<div class="primary">
    <?php include_once('../includes/inc_featured.php');?>
    <div class="main-content">
        <div class="main-content-left">
        <?php
        $i=1;
        foreach($arr_cat as $cat) {
            ?>
            <div class="home-news-box <?=($i%2==0)?'box-first':'box-last'?>">
                <div class="home-news-box-tab">
                    <a href="<?=generate_cate($cat['cat_id']);?>"><h3><?=$cat['cat_name'];?></h3></a>
                </div><!-- End home-news-box-tab -->
                <div class="home-news-box-main">
            <?
            $list_news_cat = list_news_cat($cat['cat_id']);
            foreach($list_news_cat as $key=>$news_cat) {
                if($key == 0) {
                    ?>
                    <div class="home-news-box-item first-no-margin-left">
                        <div class="img fl">
                            <a href="<?=generate_detail_url($news_cat,$cat['cat_name'])?>">
                                <img alt="<?=$news_cat['new_title']?>" src="<?=show_medium_url($news_cat['new_picture'])?>" />
                            </a>
                        </div>
                        <div class="title fr">
                            <a class="" href="<?=generate_detail_url($news_cat,$cat['cat_name'])?>"><h2><?=$news_cat['new_title']?></h2></a>
                            <span><?=cut_string($news_cat['new_teaser'],125,'...')?></span>
                        </div>
                    </div><!-- End home-news-box-item -->
                    <ul>
                <?}else{?>
                     <li><a href="<?=generate_detail_url($news_cat,$cat['cat_name'])?>"><h3><?=$news_cat['new_title']?></h3></a></li>
                    
                <?}?>
            <?}?>
                    </ul>
                </div><!-- End home-news-box-list -->      
            </div><!-- End home-news-box -->
            <?
            $i++;
        }
        ?>
        </div><!-- End main-content-left -->
        <div class="main-content-right">
            
        </div><!-- End main-content-right -->
    </div><!-- End main-content -->
</div><!-- End primary -->
<script>
    $(document).ready(function () { 
        $(window).scroll(function(){
            var scrollPos = $(window).scrollTop();
            if ( scrollPos > 95){
                $('.fix_menu_active').css({'height':'35px','width':'1010px','margin': '0 auto'})
                $('.fix_menu').css({'position':'fixed','width':'100%','height':'35px','left':'0px','top':'0px'});
                $('.navigation').css({'position':'fixed','margin':'0 auto','left':'50%','margin-left':'-505px','top':'0px'});
                
            }else{
                $('.fix_menu_active').removeAttr('style');
                $('.fix_menu').removeAttr('style');
                $('.navigation').removeAttr('style');
            }
        });  
    });
</script>